<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <script src="./jquery.js"></script>
  </head>
  <body>
    <p>hello world</p>
    <span>333</span>
    <p>nice</p>
    <h1>as</h1>
    <p>good man</p>
  </body>
  <script type="text/javascript">
    //入口函数
    // $(document).ready(function () {
    //   $('p').replaceWith('<h3>44444444444444444333</h3>')
    //   $("<span title='replaceAll'>han163@163.com</span>").replaceAll('h1')
    // })
    /**
     * @param {number[]} salary
     * @return {number}
     */
    var average = function (salary = [100, 300, 200, 500, 400]) {
      return (
        (eval(salary.join('+')) -
          Math.min.apply(null, salary) -
          Math.max.apply(null, salary)) /
        (salary.length - 2)
      )
    }
    console.log(average())
  </script>
</html>
